/*
 * VideoCaptureSource.h
 *
 *  Created on: 2018年3月19日
 *      Author: zhengboyuan
 */

#ifndef VIDEOCAPTURESOURCE_H_
#define VIDEOCAPTURESOURCE_H_

#include "VideoSource.h"

class VideoCaptureSource : public VideoSource
{
public:
	explicit VideoCaptureSource(int cameraId);
	virtual ~VideoCaptureSource();

	virtual void setSize(const cv::Size& size);

	virtual cv::Size getSize();

	virtual bool getFrame(cv::Mat& frame);

	virtual bool isOpened();

public:
	cv::Size	m_size;
	int	m_cameraId;
	cv::VideoCapture	m_capture;

};

#endif /* VIDEOCAPTURESOURCE_H_ */
